Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Printing Extensions and Drivers /
Chapter 6 - Printing Resources / Printing Resources Reference
Resources Used for Printing Extensions and Printer Drivers


The Printing Alert ('plrt') Resource

You need to include a printing alert resource to define the messages that require user attention during the printing process. Figure 6-3 shows the structure of the printing alert resource.

Figure 6-3 The printing alert resource

The printing alert resource contains a number of fields that you can use to define alert messages for display to the user in printing alert boxes.

Table 6-4 shows the constants that you can use to specify which kind of printing alert you are defining.
Table 6-4 Printing alert versions
ConstantValueExplanation
printingAlert1Produces a modal alert dialog box
printingStatus2Produces a printing alert box that can only be used with QuickDraw GX printing

Table 6-5 shows the constants that you can use to specify the icon ID for a printing
alert resource.
Table 6-5 Icon IDs for a printing alert resource
ConstantValueExplanation
noIcon-1No icon is displayed
stopIcon0The stop icon is displayed
noteIcon1The note icon is displayed
cautionIcon2The caution icon is displayed

Table 6-7 shows the constants that you can use to specify the default button strings in a printing alert resource.
Table 6-6 Default button string values for a printing alert resource
ConstantValueExplanation
noDefaultTitle0There is no default button
defaultAction1Use the action button label string
defaultTitle22Use the button label 2 string
defaultTitle33Use the button label 3 string

Table 6-7 shows the constants that you can use to specify the cancel button strings in a printing alert resource.
Table 6-7 Cancel button string values for a printing alert resource
ConstantValueExplanation
noCancelTitle0There is no cancel button
cancelAction1Use the action button label string
cancelTitle22Use the button label 2 string
cancelTitle33Use the button label 3 string

Listing 6-4 shows an example of a printing alert resource.

Listing 6-4 An example of a printing alert resource

resource 'plrt' (kDriverStatus, sysHeap, purgeable)
{
   printingStatus,
   cautionIcon,
   defaultSystemSize,
   defaultAction,
   noCancelTitle,
   "The document "!1" cannot be printed, because the printer "   ""!0" is offline.  To continue printing, please make "   "sure the printer is "   "properly connected and turned on.  If you wish "   "to cancel printing, please click Cancel Printing.",
   "Cancel Printing",
   "",
   "",
   " ",
   "Printer offline"};
This resource defines the contents of the printing alert box that corresponds to the second entry in the status resource that is shown in Listing 6-3 on page 6-21. The printing alert box contains a caution icon and a Cancel button. The text is displayed using the default system font and text size.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help